import requests


class iRHMLoginApi:
    @classmethod
    def login(cls, login_json) -> requests.Response:
        url = "http://ihrm2-test.itheima.net/api/sys/login"
        headers = {
            'Content-Type': 'application/json'
        }

        r = requests.post(url, headers=headers, json=login_json)
        return r


if __name__ == '__main__':
    json={
        "mobile": "13800000002",
        "password": "123456"
    }
    r=iRHMLoginApi.login(json)
    x=(r.json())
    a=x.get('data')
    print(a)